<template>
	<a-config-provider :locale="locale">
		<div id="app">
			<router-view />
		</div>
	</a-config-provider>
</template>

<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
import { AppDeviceEnquire } from '@/utils/mixin'

export default {
	mixins: [AppDeviceEnquire],
	data() {
		return {
			locale: zhCN,
		}
	},
	created() {
		document.addEventListener('contextmenu', this.handleContextMenu);
	},
	beforeDestroy() {
		document.removeEventListener('contextmenu', this.handleContextMenu);
	},
	methods: {
		handleContextMenu(e) {
			// e.preventDefault();
		}
	},
	mounted() {
	}
}
</script>

<style lang="less">
.ant-table-tbody>tr>td {
	padding: 4px 16px !important;
	height: 50px !important;
}

.selectText {
	background-color: #e8f4ff;
	padding: 5px 10px;
	color: #1890ff;
	margin-top: 10px;
	margin-bottom: 0;
	border-radius: 3px 3px 0 0;
	font-size: 13px;
	width: 250px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.selectText>span>span.bold {
	font-size: 15px;
	font-weight: bold;
}

.select-btn {
	width: 20px;
	height: 20px;
	border: 0.5px solid #aaa;
	// border-radius: 50%;
	border-radius: 2px;
	user-select: none;
	cursor: pointer;
	position: relative;
	transition: .2s;

	&:hover {
		border-color: #1890FF;
	}
}

// 全选
.select-btn__selected {
	border: 0.5px solid #1890FF !important;
	background: #1890FF !important;
	// border-radius: 50%;
	border-radius: 2px;

	&::after {
		content: '✓';
		font-weight: bold;
		color: #fff;
		position: absolute;
		top: -1px;
		left: 4px;
	}
}

// 半选
.select-btn__half {
	border: 0.5px solid #aaa !important;
	background: #fff !important;
	// border-radius: 50%;
	border-radius: 2px;

	&::after {
		content: '■';
		font-weight: bold;
		color: #1890ff;
		position: absolute;
		top: -2px;
		left: 3px;
	}
}

// 禁用
.select-btn__disabled {
	background: #e9e9e9 !important;
	border: 0.5px solid #e9e9e9 !important;
	cursor: not-allowed !important;

	&::after {
		content: '' !important;
	}
}
</style>
